//
//  SetMealView.m
//  Project two framework
//
//  Created by rimi on 16/7/29.
//  Copyright © 2016年 张峥. All rights reserved.
//

#import "SetMealView.h"

@implementation SetMealView

//单例
+(instancetype)showOtherView
{
    static SetMealView *setMealView = nil;
    setMealView = [[SetMealView alloc]init];
    return setMealView;
}

//重写的init方法
-(instancetype)init
{
    self = [super init];
    if (self) {
        [self addOtherView];
 
        
        
    }
    return self;
}

- (void )addOtherView{
    [super addOtherView];
    self.shoppingBtn.hidden = YES;
//    [self.imageView addSubview:self.content];
    [self.imageView addSubview:self.label_1];
    [self.imageView addSubview:self.label_2];
    [self.imageView addSubview:self.label_3];
    [self.imageView addSubview:self.label_4];
    [self.imageView addSubview:self.label_5];
    [self.imageView addSubview:self.preserveBtn];
    [self.imageView addSubview:self.applyForBtn];
}

-(UILabel *)label_1
{
    if (_label_1 == nil) {
        _label_1 = [[UILabel alloc]init];
        
        _label_1.textAlignment = NSTextAlignmentLeft;
        _label_1.numberOfLines = 0;
        _label_1.font = [UIFont systemFontOfSize:16];
    }
    return _label_1;
}

-(UILabel *)label_2
{
    if (_label_2 == nil) {
        _label_2 = [[UILabel alloc]init];
        
        _label_2.textAlignment = NSTextAlignmentLeft;
        _label_2.numberOfLines = 0;
        _label_2.font = [UIFont systemFontOfSize:16];
    }
    return _label_2;
}

-(UILabel *)label_3
{
    if (_label_3 == nil) {
        _label_3 = [[UILabel alloc]init];
//        _label_3.text = @"wertyuioplkjhgfdsxcvbnm,.lkjhgfdertyuiokjhgfddfghhhhhhhhhhhhhhhhhhhhhhhhhh王企鹅摇尾乞怜的龙肝凤胆开始都是反攻倒算空间世界各地是咖啡馆三等功开会个疯狂回归蒋经国的风景好感动广泛的结果发回国绝代风华个富的后果很高冠军和短裤入";
//        //自事宜高度
//        CGRect rect = [_label_3.text boundingRectWithSize:CGSizeMake(630, 500) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16]} context:nil];
//        _label_3.frame = CGRectMake(50, (_label_2.frame.size.height) + 10, 650, rect.size.height);
        _label_3.textAlignment = NSTextAlignmentLeft;
        _label_3.numberOfLines = 0;
        _label_3.font = [UIFont systemFontOfSize:16];
    }
    return _label_3;
}

-(UILabel *)label_4
{
    if (_label_4 == nil) {
        _label_4 = [[UILabel alloc]init];
//        //自事宜高度
//        CGRect rect = [_label_4.text boundingRectWithSize:CGSizeMake(630, 500) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16]} context:nil];
//        _label_4.frame = CGRectMake(50, (_label_3.frame.size.height) + 10, 650, rect.size.height);
        _label_4.textAlignment = NSTextAlignmentLeft;
        _label_4.numberOfLines = 0;
        
        _label_4.backgroundColor = [UIColor clearColor];
        _label_4.font = [UIFont systemFontOfSize:16];
    }
    return _label_4;
}

-(UILabel *)label_5
{
    if (_label_5 == nil) {
        _label_5 = [[UILabel alloc]init];
//        //自事宜高度
//        CGRect rect = [_label_5.text boundingRectWithSize:CGSizeMake(630, 500) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16]} context:nil];
//        _label_5.frame = CGRectMake(50, (_label_4.frame.size.height), 650, rect.size.height);
        _label_5.textAlignment = NSTextAlignmentLeft;
        _label_5.numberOfLines = 0;
        _label_5.backgroundColor = [UIColor clearColor];
        _label_5.font = [UIFont systemFontOfSize:16];
    }
    return _label_5;
}
-(UIButton *)preserveBtn
{
    if (_preserveBtn == nil) {
        _preserveBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        _preserveBtn.frame = CGRectMake(self.bounds.size.width / 2 -270, 485, 155, 45);
        [_preserveBtn setImage:[UIImage imageNamed:@"保存选购_06.png"] forState:UIControlStateNormal];
        
    }
    return _preserveBtn;
}

-(UIButton *)applyForBtn{
    if (_applyForBtn == nil) {
        _applyForBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        _applyForBtn.frame = CGRectMake(self.bounds.size.width / 2 , 485, 155, 45);
        [_applyForBtn setImage:[UIImage imageNamed:@"申请办理_06.png"] forState:UIControlStateNormal];
        
    }
    return _applyForBtn;
}
















@end
